<h1> Liste des Users</h1>
<table>
  <th>Login</th>
  <th>Email</th>
  <th>profil</th>
<% @user.each do |user| %>
  <tr>
    <td>
      <%= user.login %>
    </td>
    <td>
      <%= user.email %>
    </td>
    <td>
      <%= user.profil %>
    </td>
    <td>
      <%= link_to image_tag("voir.png", :alt => "Voir"), user_url(user.id) %>
    </td>
    <td>
	<% if authenticated? %>
		  <%= link_to image_tag("edit.png", :alt => "edit"), :controller => "users", :action => "edit", :id => user.id %>
		</td>
		<% if session[:user_id] != user.id %>
			<td>
			  <%= link_to image_tag("supp.png", :alt => "supprimer"), user_path(user), :confirm => "Etes-vous sur?", :method => :delete %>
			</td>
		<% end %>
	<% end %>
  </tr>
<% end %>
</table>
<br />
<% if authenticated? %>
	<%= link_to 'Nouvel utilisateur', new_user_path %>
<% end %>